<?php
namespace app\index\controller;

class Hot extends Base{
	public function index(){
		$data = db('picture')->alias('a')->join("hits b","b.hitsid = concat('c-3-',a.id)")->where('views > 100')->order('b.views desc')->paginate(10,false,[
            'page' => input('param.p'),
            'path'=> '/hot/p/[PAGE].html',
        ]);
    	$page = $data->render();
    	$cat = $this->category();
        $catname = '本站热门图片';
    	$seo = $this->site();
    	$seo['site_title'] = $catname.' - '.$seo['site_title'];
		$this->assign('data', $data);
    	$this->assign('page', $page);
    	$this->assign('seo', $seo);
		return $this->fetch();
	}
}